const {
  miniProgram: {
    envVersion
  }
} = wx.getAccountInfoSync();
let host = "https://tickets.fenfenlian.cn/rest/wechat";
let upLoadUrl = "https://tickets.fenfenlian.cn/rest/files/uploadImg";
let appid = "wxc7f8c9dd8e5a7c66";

function isDevEnv() {
  return envVersion !== "release"; //develop 开发版本 trial体验版 release 正式版
}
if (isDevEnv()) {
  host = "https://test.fenfenlian.cn/rest/wechat";
  upLoadUrl = "https://test.fenfenlian.cn/rest/files/uploadImg";
  appid = "wxc7f8c9dd8e5a7c66";
}
export function getHost() {
  return host;
}
export function getUploadUrl() {
  return upLoadUrl;
}
export function getMiniAppid() {
  return appid;
}
export function appMapKey() {
  return 'AQVBZ-M27WA-P22KU-CA7FG-F4BYT-Q6BXL'; // beta
}
// 天地图key
export function tiandituKey() {
  return 'a6b2125e99a2a309ff0144ee1fed4a73';
}
// 天地图 逆地理
export function getTianMapApi() {
  return 'https://api.tianditu.gov.cn/geocoder';
}